import { Component, OnInit } from "@angular/core";
import { ShopService } from "./shop.service";

@Component({
  selector: "app-shop",
  templateUrl: "./shop.component.html",
  styleUrls: ['../style.css',"./shop.component.css"]
})
export class ShopComponent implements OnInit {
  lst: string[];
  constructor(private service: ShopService) {}

  ngOnInit() {
    //console.log("---------shopCom--init");
    this.lst = this.service.getlst();
  }
  add(s: string) {
    this.service.add(s);
  }
  dellast() {
    this.service.dellast();
  }
  reload() {
    //console.log("-------Shop com--reload-------");
    this.lst = this.service.getlst();
  }

  setlst() {
    this.lst = this.service.getlst();
  }
}
